home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / modules / nessus-2.2.8.mo / usr / include / nessus / nessustcp.h < prev    next >
C/C++ Source or Header  |  2006-06-13  |  1KB  |  70 lines

  1. #ifndef NESSUS_TCP_H__
  2. #define NESSUS_TCP_H__
  3.  
  4.  
  5. #ifdef HAVE_NETINET_TCP_H
  6. #include <netinet/tcp.h>
  7. #endif
  8.  
  9. #ifdef _CYGWIN_
  10. #define tcp_seq u_int
  11. #endif
  12.  
  13.  
  14. #if !defined(HAVE_STRUCT_TCPHDR) || (HAVE_STRUCT_TCPHDR == 0)
  15. #undef HAVE_TCPHDR_TH_X2_OFF
  16. #undef HAVE_TCPHDR_TH_OFF
  17. #define HAVE_TCPHDR_TH_OFF 1
  18. #define HAVE_STRUCT_TCPHDR 1
  19. struct tcphdr {
  20.     u_short    th_sport;        /* source port */
  21.     u_short    th_dport;        /* destination port */
  22.     tcp_seq    th_seq;            /* sequence number */
  23.     tcp_seq    th_ack;            /* acknowledgement number */
  24. #if !WORDS_BIGENDIAN
  25.     u_int    th_x2:4,        /* (unused) */
  26.         th_off:4;        /* data offset */
  27. #endif
  28. #if WORDS_BIGENDIAN
  29.     u_int    th_off:4,        /* data offset */
  30.         th_x2:4;        /* (unused) */
  31. #endif
  32.     u_char    th_flags;
  33.  
  34.     u_short    th_win;            /* window */
  35.     u_short    th_sum;            /* checksum */
  36.     u_short    th_urp;            /* urgent pointer */
  37. };
  38.  
  39. #endif
  40.  
  41.  
  42. #ifndef TH_FIN
  43. #define    TH_FIN    0x01
  44. #endif
  45.  
  46. #ifndef TH_SYN
  47. #define    TH_SYN    0x02
  48. #endif
  49.  
  50. #ifndef TH_RST
  51. #define    TH_RST    0x04
  52. #endif
  53.  
  54. #ifndef TH_PUSH
  55. #define    TH_PUSH    0x08
  56. #endif
  57.  
  58. #ifndef TH_ACK
  59. #define    TH_ACK    0x10
  60. #endif
  61.  
  62. #ifndef TH_URG
  63. #define    TH_URG    0x20
  64. #endif
  65.  
  66. #ifndef TH_FLAGS
  67. #define TH_FLAGS (TH_FIN|TH_SYN|TH_RST|TH_ACK|TH_URG)
  68. #endif
  69. #endif
  70.